package com.ruoyi.project.yuwen.audioapprovelog.service.impl;

import com.ruoyi.common.utils.text.Convert;
import com.ruoyi.framework.aspectj.lang.annotation.DataSource;
import com.ruoyi.framework.aspectj.lang.enums.DataSourceType;
import com.ruoyi.project.yuwen.audioapprovelog.domain.AudioApproveLog;
import com.ruoyi.project.yuwen.audioapprovelog.mapper.AudioApproveLogMapper;
import com.ruoyi.project.yuwen.audioapprovelog.service.IAudioApproveLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 音频审核日志Service业务层处理
 *
 * @author shixiangwen
 * @date 2021-03-24
 */
@Service
@DataSource(DataSourceType.KKCUSER)
public class AudioApproveLogServiceImpl implements IAudioApproveLogService {
    @Autowired
    private AudioApproveLogMapper audioApproveLogMapper;

    /**
     * 查询音频审核日志
     *
     * @param id 音频审核日志ID
     * @return 音频审核日志
     */
    @Override
    public AudioApproveLog selectAudioApproveLogById(Long id) {
        return audioApproveLogMapper.selectAudioApproveLogById(id);
    }

    /**
     * 查询音频审核日志列表
     *
     * @param audioApproveLog 音频审核日志
     * @return 音频审核日志
     */
    @Override
    public List<AudioApproveLog> selectAudioApproveLogList(AudioApproveLog audioApproveLog) {
        return audioApproveLogMapper.selectAudioApproveLogList(audioApproveLog);
    }

    /**
     * 新增音频审核日志
     *
     * @param audioApproveLog 音频审核日志
     * @return 结果
     */
    @Override
    public int insertAudioApproveLog(AudioApproveLog audioApproveLog) {
        return audioApproveLogMapper.insertAudioApproveLog(audioApproveLog);
    }

    /**
     * 修改音频审核日志
     *
     * @param audioApproveLog 音频审核日志
     * @return 结果
     */
    @Override
    public int updateAudioApproveLog(AudioApproveLog audioApproveLog) {
        return audioApproveLogMapper.updateAudioApproveLog(audioApproveLog);
    }

    /**
     * 删除音频审核日志对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteAudioApproveLogByIds(String ids) {
        return audioApproveLogMapper.deleteAudioApproveLogByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除音频审核日志信息
     *
     * @param id 音频审核日志ID
     * @return 结果
     */
    @Override
    public int deleteAudioApproveLogById(Long id) {
        return audioApproveLogMapper.deleteAudioApproveLogById(id);
    }
}
